<template>
  <j-modal title="就业人员信息" :width="600" :visible="visible" switchFullscreen :footer="null" @cancel="handleCancel"
    @ok="handleOk">
    <div class="box">
      <p><span>人员类型：</span>{{ setTittle(infoObj.type) }}</p>
      <p><span>姓名：</span>{{ infoObj.name }}</p>
      <p><span>身份证号：</span>{{ infoObj.identification }}</p>
      <p><span>性别：</span>{{ infoObj.gender == '1' ? '男' : '女' }}</p>
      <p><span>出生日期：</span>{{ infoObj.dateBirth }}</p>
      <p><span>文化程度：</span>{{ setTittle2(infoObj.degreeEducation) }}</p>
      <p><span>户籍地详址：</span>{{ infoObj.registerDetails }}</p>
      <p><span>现居住地详址：</span>{{ infoObj.address }}</p>
      <p><span>就业状态：</span>{{ infoObj.name }}</p>
      <p><span>就业单位：</span>{{ infoObj.employUnit }}</p>
      <p><span>就业时间：</span>{{ infoObj.employTime }}</p>
      <p><span>就业地点：</span>{{ infoObj.employPlace }}</p>
      <p><span>就业类型：</span>{{ setTittle1(infoObj.employType) }}</p>
      <p><span>岗位：</span>{{ infoObj.post }}</p>
      <p><span>工资待遇：</span>{{ infoObj.salaryTreatment }}</p>
      <p><span>联系电话：</span>{{ infoObj.contactNumber }}</p>
    </div>
    <!-- <template slot="footer">
      <a-button type="primary"  @click="onTJ()">就业推荐</a-button>
      <p style="text-align: left;">创建人：{{ 121212 }} <span style="margin-left:30px;">创建时间：{{ 222 }}</span> </p>
    </template> -->
  </j-modal>
</template>
<script>
import * as employmentApi from '@/api/sjsk/help/employment.js'
export default {
  name: 'detailModal',
  data() {
    return {
      visible: false,
      infoObj: {},
    }
  },
  async created() {
  },
  methods: {
    show(record) {
      this.visible = true
      this.infoObj = {}
      this.getDetail(record)
    },
    getDetail(record) {
      employmentApi.employPlacementDetails({ id: record.id, type: record.type }).then(res => {
        if (res.success) {
          this.infoObj = res.result
        }
      })
    },
    setTittle(text) {
      return this.$filterDictTextByCache('personType', text)  //现在字典中对应的文字，是全局函数
    },
    setTittle1(text) {
      return this.$filterDictTextByCache('employType', text)  //现在字典中对应的文字，是全局函数
    },
    setTittle2(text) {
      return this.$filterDictTextByCache('degreeEducation', text)  //现在字典中对应的文字，是全局函数
    },
    handleCancel() {
      this.visible = false
    },
    handleOk() {
      this.visible = false
    },
    onTJ() {

    }
  },
}
</script>
<style lang="less" scoped>
.box {
  span {
    display: inline-block;
    width: 120px;
    text-align: left;
  }
}

/deep/ .ant-modal-footer {
  // display: flex;
  // justify-content: space-between;
  text-align: right;
}
</style>
